home *** CD-ROM | disk | FTP | other *** search
/ Shareworld 8 / Shareworld 8 (Disk 2 of 2).adf / Programs / MachineCodeHelloWorld / MyIncludes / OpIntuitionMacros.i < prev    next >
Encoding:
Text File  |  1978-02-11  |  1.2 KB  |  43 lines

  1. ; --------------------------------------------------------------
  2. ; --------------------------------------------------------------
  3. ; Standard Intuition Macros for systems using Commodore Includes.
  4. ; Requires Graphics library/Intuition library.
  5. ; Matthew Goode - 28/1/97
  6. ; --------------------------------------------------------------
  7. ; --------------------------------------------------------------
  8.  
  9. GetFontHeight    Macro
  10.     ;Finds the height of the font currently used in the RastPort as
  11.     ;pointed to by \1 (an aX)
  12.     ;Result is in \2,
  13.     move.w rp_TxHeight(\1),\2
  14.     EndM
  15.  
  16. ;  -------------------------------------------------------------------
  17.  
  18. GetWindowDimensionsSansBorder    Macro
  19.     ;Finds the size of the window (adjusted for border size) as
  20.     ;specified by the handle in \1 (as an aX)
  21.     ;Results are starting x,y positions in \3,\4 
  22.     ;and ending x,y positions of the window in x2,y2 in \5,\6
  23.  
  24.     Moveq #0,\2
  25.     moveq #0,\4
  26.     move.b wd_BorderRight(\1),\2
  27.     move.w wd_Width(\1),\4
  28.     sub.w \2,\4
  29.  
  30.     Moveq #0,\3
  31.     moveq #0,\5
  32.     move.b wd_BorderBottom(\1),\3
  33.     move.w wd_Height(\1),\5
  34.     sub.w \3,\5
  35.  
  36.     move.b wd_BorderLeft(\1),\2
  37.     move.b wd_BorderTop(\1),\3
  38.     EndM
  39.  
  40. ; --------------------------------------------------------------
  41.  
  42.